Stack sortieren
Out-Place
funktion sortieren(stack):
tempStack = new stack();
solange stack nicht leer ist:
temp = stack.pop
solange tempStack nicht leer und tempStack.top > temp
stack.push(tempStack.pop)
tempStack.push(stack)funktion sortieren(stack):
tempStack = new stack();
solange stack nicht leer ist:
temp = stack.pop
solange tempStack nicht leer und tempStack.top > temp
stack.push(tempStack.pop)
tempStack.push(stack)